/**
 * Copyright &copy; 2015-2020 <a href="http://www.easyhis.com/">easyhis</a> All rights reserved.
 */
package com.easy.dfcapi.entity;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.NotNull;
import java.util.Date;

import com.easy.common.utils.IdGen;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.easy.modules.sys.entity.User;

import com.easy.core.persistence.DataEntity;
import com.easy.common.utils.excel.annotation.ExcelField;

/**
 * 品牌表Entity
 * @author waylen chi
 * @version 2018-01-17
 */
public class ApiBrand extends DataEntity<ApiBrand> {
	
	private static final long serialVersionUID = 1L;
	private String id;		// id
	private Integer brandId;		// brand_id
	private Integer storeId;		// 品牌提供的店铺ID,外键(StoreSet)
	private String brandName;		// 品牌名称
	private String suitScope;		// 适合领域
	private Integer brandLogo;		// 品牌LOGO
	private String brandLogoUrl;		// 品牌LOGO_Url
	private Integer brandImg;		// 品牌展示效果图
	private String brandImgUrl;		// 品牌展示效果图Url
	private String brandDesc;		// 品牌描述
	private String sortNo;		// 排序
	private String isShow;		// 是否显示
	private Date auditTime;		// 平台审核通过日期
	private Integer auditBy;		// 审核者
	private Date startDate;		// 注册日期
	private Date endDate;		// 注册有效期
	private Date createTime;		// 创建时间
	private User createBy;		// 创建者
	private Date updateTime;		// 更新时间
	private User updateBy;		// 更新者
	private Integer auditStatus;		// 当前品牌审核状态
	private String delFlag;		// 删除标志
	
	public ApiBrand() {
		super();
	}

	public ApiBrand(String id){
		this.id = id;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@NotNull(message="brand_id不能为空")
	@ExcelField(title="brand_id", align=2, sort=0)
	public Integer getBrandId() {
		return brandId;
	}

	public void setBrandId(Integer brandId) {
		this.brandId = brandId;
	}
	
	@NotNull(message="品牌提供的店铺ID,外键(StoreSet)不能为空")
	@ExcelField(title="品牌提供的店铺ID,外键(StoreSet)", align=2, sort=1)
	public Integer getStoreId() {
		return storeId;
	}

	public void setStoreId(Integer storeId) {
		this.storeId = storeId;
	}
	
	@ExcelField(title="品牌名称", align=2, sort=2)
	public String getBrandName() {
		return brandName;
	}

	public void setBrandName(String brandName) {
		this.brandName = brandName;
	}
	
	@ExcelField(title="适合领域", align=2, sort=3)
	public String getSuitScope() {
		return suitScope;
	}

	public void setSuitScope(String suitScope) {
		this.suitScope = suitScope;
	}
	
	@ExcelField(title="品牌LOGO", align=2, sort=4)
	public Integer getBrandLogo() {
		return brandLogo;
	}

	public void setBrandLogo(Integer brandLogo) {
		this.brandLogo = brandLogo;
	}
	
	@ExcelField(title="品牌展示效果图", align=2, sort=5)
	public Integer getBrandImg() {
		return brandImg;
	}

	public void setBrandImg(Integer brandImg) {
		this.brandImg = brandImg;
	}
	
	@ExcelField(title="品牌描述", align=2, sort=6)
	public String getBrandDesc() {
		return brandDesc;
	}

	public void setBrandDesc(String brandDesc) {
		this.brandDesc = brandDesc;
	}
	
	@ExcelField(title="排序", align=2, sort=7)
	public String getSortNo() {
		return sortNo;
	}

	public void setSortNo(String sortNo) {
		this.sortNo = sortNo;
	}
	
	@ExcelField(title="是否显示", align=2, sort=8)
	public String getIsShow() {
		return isShow;
	}

	public void setIsShow(String isShow) {
		this.isShow = isShow;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="平台审核通过日期", align=2, sort=9)
	public Date getAuditTime() {
		return auditTime;
	}

	public void setAuditTime(Date auditTime) {
		this.auditTime = auditTime;
	}
	
	@ExcelField(title="审核者", align=2, sort=10)
	public Integer getAuditBy() {
		return auditBy;
	}

	public void setAuditBy(Integer auditBy) {
		this.auditBy = auditBy;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="注册日期", align=2, sort=11)
	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="注册有效期", align=2, sort=12)
	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="创建时间", align=2, sort=13)
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	@ExcelField(title="创建者", align=2, sort=14)
	public User getCreateBy() {
		return createBy;
	}

	public void setCreateBy(User createBy) {
		this.createBy = createBy;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@ExcelField(title="更新时间", align=2, sort=15)
	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	
	@ExcelField(title="更新者", align=2, sort=16)
	public User getUpdateBy() {
		return updateBy;
	}

	public void setUpdateBy(User updateBy) {
		this.updateBy = updateBy;
	}
	
	@ExcelField(title="当前品牌审核状态", align=2, sort=17)
	public Integer getAuditStatus() {
		return auditStatus;
	}

	public void setAuditStatus(Integer auditStatus) {
		this.auditStatus = auditStatus;
	}
	
	@ExcelField(title="删除标志", dictType="del_flag", align=2, sort=18)
	public String getDelFlag() {
		return delFlag;
	}

	public void setDelFlag(String delFlag) {
		this.delFlag = delFlag;
	}

	public String getBrandLogoUrl() {
		return brandLogoUrl;
	}

	public void setBrandLogoUrl(String brandLogoUrl) {
		this.brandLogoUrl = brandLogoUrl;
	}

	public String getBrandImgUrl() {
		return brandImgUrl;
	}

	public void setBrandImgUrl(String brandImgUrl) {
		this.brandImgUrl = brandImgUrl;
	}

	/**
	 * 插入之前执行方法，需要手动调用
	 */
	public void preInsert(){
		this.id = IdGen.uuid();

		this.updateTime = new Date();
		this.createTime = this.updateTime;
	}

	/**
	 * 更新之前执行方法，需要手动调用
	 */
	public void preUpdate(){
		this.updateTime = new Date();
	}
	/**
	 * 插入之前执行方法，需要手动调用
	 */
	public void preInsert(Date now){
		this.id = IdGen.uuid();

		this.updateTime = now;
		this.createTime = this.updateTime;
	}

	/**
	 * 更新之前执行方法，需要手动调用
	 */
	public void preUpdate(Date now){
		this.updateTime = now;
	}


}